//
//  LoopUITests.swift
//  LoopUITests
//
//  Created by thomas on 2020/9/23.
//

import XCTest

class LoopUITests: XCTestCase {

    var app: XCUIApplication!

    override func setUpWithError() throws {

        continueAfterFailure = false

        app = XCUIApplication()
        app.launch()
    }

    override func tearDownWithError() throws {
    }

    func testShowData() throws {

        let expectation = self.expectation(description: "testShowData")
        DispatchQueue.main.asyncAfter(deadline: .now() + 10) {

            let tableView = self.app.tables.firstMatch
            XCTAssertNotNil(tableView)
            XCTAssertEqual(tableView.cells.count, 32)

            expectation.fulfill()
        }

        self.waitForExpectations(timeout: 15, handler: nil)
    }
}
